package com.jdz.util;

public class MyStringUtil {

    public static String findtoSee(String name,String xiqngqi){

        int start = xiqngqi.indexOf(name);

        if(start>=0){
            if(xiqngqi.length()<=220){
                return xiqngqi;
            }

            if(start <= 10){
                return xiqngqi.substring(0,200);
            }

            if(xiqngqi.length()-start-1<200){
                return xiqngqi.substring(xiqngqi.length()-210);
            }else {
                return xiqngqi.substring(start,start+200);
            }
        }else {

            if(xiqngqi.length()<=220){
                return xiqngqi;
            }else {
                return xiqngqi.substring(0,200);
            }


        }

    }

//    public static void main(String[] args){
//       int a = "3wefwargwfpojawjepofapjofpjfo".indexOf("name");
//        System.out.println(a);
//    }

}
